
package cz.muni.fi.PA165.musiclibrarybackend.dto;

import cz.muni.fi.PA165.musiclibraryapi.dto.AlbumDTOInterface;
import cz.muni.fi.PA165.musiclibraryapi.dto.AuthorDTOInterface;
import cz.muni.fi.PA165.musiclibraryapi.dto.GenreDTOInterface;
import cz.muni.fi.PA165.musiclibraryapi.dto.SongDTOInterface;
import java.io.Serializable;

/**
 *
 * @author Tibor
 */
public class SongDTO implements SongDTOInterface, Serializable {

    private Long id;
    private String name;
    private int bitrate;
    private int songOrder;
    private String comment;  
    private AuthorDTO author;
    private GenreDTO genre;
    private AlbumDTO album;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getBitrate() {
        return bitrate;
    }

    public void setBitrate(int bitrate) {
        this.bitrate = bitrate;
    }

    public int getSongOrder() {
        return songOrder;
    }

    public void setSongOrder(int songOrder) {
        this.songOrder = songOrder;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public AuthorDTOInterface getAuthor() {
        return author;
    }

    public void setAuthor(AuthorDTOInterface author) {
        this.author = (AuthorDTO) author;
    }

    public GenreDTOInterface getGenre() {
        return genre;
    }

    public void setGenre(GenreDTOInterface genre) {
        this.genre = (GenreDTO)genre;
    }

    public AlbumDTOInterface getAlbum() {
        return album;
    }

    public void setAlbum(AlbumDTOInterface album) {
        this.album = (AlbumDTO)album;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 37 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final SongDTO other = (SongDTO) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }
    
    
    
}
